﻿using System.ComponentModel.DataAnnotations;

namespace Competition.Admin.Web.Models.BannerViewModels
{
    /// <summary>
    /// 轮播图视图模型
    /// </summary>
    public class BannerViewModel
    {
        public int Id { get; set; }
        /// <summary>
        /// 图片地址
        /// </summary>
        [Display(Name = "图片")]
        public string Url { get; set; }
        /// <summary>
        /// 链接
        /// </summary>
        [StringLength(500, MinimumLength = 0, ErrorMessage = "{2}到{1}个字符")]
        [Display(Name = "链接")]
        public string Link { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [Required(ErrorMessage = "必填", AllowEmptyStrings = false)]
        [StringLength(500, MinimumLength = 0, ErrorMessage = "{2}到{1}个字符")]
        [Display(Name = "标题")]
        public string Title { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Required(ErrorMessage = "必填", AllowEmptyStrings = false)]
        [Display(Name = "状态")]
        public int Status { get; set; }
    }
}